import unittest
from Page.page import Page
from Page.page1 import Page1
from Page.page2 import Page2
import time
from selenium import webdriver
from Mysql import *
from ddt import ddt,file_data
from common import log_send

from ddt import ddt,file_data
@ddt
class Test_case(unittest.TestCase):
    def setUp(self):
        self.driver=webdriver.Edge()
        self.driver.maximize_window()
        # 显示等待
        self.driver.implicitly_wait(2)
        log_send()
        self.sql=mysql(host='10.59.9.14',user='root',password='yidong666',db='a3mall')

    def tearDown(self):
        time.sleep(10)
        self.driver.quit()

    @file_data('data.yaml')
    def test_a3mall(self,user,word):
        po=Page(self.driver)
        po.a3mall_luoji(user,word)
    def test_a3mall1(self):
        po=Page1(self.driver)
        po.a3mall_luoji1()

    def test_a3mall2(self):
        po=Page2(self.driver)
        po.a3mall_luoji2()








if __name__ == '__main__':
    unittest.main()